/* eslint-disable */
import http from "./Common/http.js";
import constant from "./constant.js";
import axios from "axios";

export default {
  //查询个人信息
  user_v1_findOwn: async () => {
    const res = await http.post(constant.BASE_URL + "/user/v1/findOwn");
    return res;
  },
  //更新个人信息
  user_v1_updateOwn: async data => {
    const res = await http.post(constant.BASE_URL + "/user/v1/updateOwn", data);
    return res;
  },
  // 获取验证码
  user_v1_msg_code: async function (phone) {
    const res = await http.post(
      constant.BASE_URL + "/sms/v1/msg/code/" + phone
    );
    return res;
  },
  //修改密码
  security_v1_changePassword: async function (data) {
    const res = await http.post(
      constant.BASE_URL + "/security/v1/chagePassword",
      data
    );
    return res;
  },
  //修改手机号
  security_v1_changePhone: async function (data) {
    const res = await http.post(
      constant.BASE_URL + "/security/v1/changePhone",
      data
    );
    return res;
  },
  //忘记密码
  security_v1_forgetPassword: async function (data) {
    const res = await http.post(
      constant.BASE_URL + "/security/v1/forgetPassword",
      data
    );
    return res;
  },
  //验证用户密码
  security_v1_validatePassword: async function (data) {
    const res = await http.post(
      constant.BASE_URL + "/security/v1/validatePassword?password=" + data
    );
    return res;
  },
  //登出
  security_v1_logout: async function () {
    const res = await http.get(constant.BASE_URL + "/security/v1/logout");
    return res;
  },
  //app发布版本展示
  appVersion_v1_list: async function (data) {
    const res = await http.post(
      constant.BASE_URL + "/appVersion/v1/list",
      data
    );
    return res;
  },
  //APP版本详情展示
  appVersion_v1_get: async function (data) {
    const res = await http.get(
      constant.BASE_URL + "/appVersion/v1/get/" + data
    );
    return res;
  },

  //APP升级更新
  appVersion_v1_app_force: async function (data) {
    const res = await http.post(
      constant.BASE_URL + "/appVersion/v1/app/force",
      data
    );
    return res;
  },

  //社区医疗轮播图展示前台
  medicalBanner_v1_list_frontEnd: async function (data) {
    const res = await http.post(
      constant.BASE_URL + "/medicalBanner/v1/list/frontEnd",
      data
    );
    return res;
  },
  //图片上传
  upload_image: async function (data) {
    const res = axios.post(process.env.VUE_APP_BASE_API + constant.BASE_URL + "/upload/image", data);
    return res;
  },

  //社区特色服务项目展示前台
  spServiceItem_v1_list_frontEnd: async function () {
    const res = http.get(constant.BASE_URL + "/spServiceItem/v1/list/frontEnd");
    return res;
  },
  //新增特色服务申请
  spServiceApply_v1_create: async function (data) {
    const res = http.post(
      constant.BASE_URL + "/spServiceApply/v1/create",
      data
    );
    return res;
  },
  //特色服务申请展示前台
  spServiceApply_v1_list_frontEnd: async function (data) {
    const res = http.post(
      constant.BASE_URL + "/spServiceApply/v1/list/frontEnd",
      data
    );
    return res;
  },
  //特色服务申请详情
  spServiceApply_v1_get: async function (data) {
    const res = http.get(constant.BASE_URL + "/spServiceApply/v1/get/" + data);
    return res;
  },
  //展示最新健康资讯前台
  healthInfo_v1_latest_list_frontEnd: async function (data) {
    const res = http.post(
      constant.BASE_URL + "/healthInfo/v1/list/frontEnd",
      data
    );
    return res;
  },
  //健康资讯详情
  healthInfo_v1_get: async function (data) {
    const res = http.get(constant.BASE_URL + "/healthInfo/v1/get/" + data);
    return res;
  },
  //搜索健康资讯
  healthInfo_v1_searchFront: async function (data) {
    const res = http.post(
      constant.BASE_URL + "/healthInfo/v1/searchFront",
      data
    );
    return res;
  },

  //医生展示
  doctor_v1_list: async function (data) {
    const res = http.post(constant.BASE_URL + "/doctor/v1/list", data);
    return res;
  },
  //搜索医生
  doctor_v1_search: async function (data) {
    const res = http.post(constant.BASE_URL + "/doctor/v1/search", data);
    return res;
  },
  //医生详情
  doctor_v1_get: async function (data) {
    const res = http.get(constant.BASE_URL + "/doctor/v1/get/" + data);
    return res;
  },

  //科室名称列表
  healthInfo_v1_getDepts: async function () {
    const res = http.get(constant.BASE_URL + "/healthInfo/v1/getDepts");
    return res;
  },

  //健康咨询展示
  medicalAdvisory_v1_list_frontEnd: async function (data) {
    const res = http.post(
      constant.BASE_URL + "/medicalAdvisory/v1/list/frontEnd", data
    );
    return res;
  },


  //新增子节点健康咨询
  medicalAdvisory_v1_createDetail: async function (data) {
    const res = http.post(
      constant.BASE_URL + "/medicalAdvisory/v1/createDetail", data
    );
    return res;
  },
  //搜索健康咨询
  commonAdvisory_v1_list_frontEnd: async function (data) {
    const res = http.post(
      constant.BASE_URL + "/commonAdvisory/v1/list/frontEnd",
      data
    );
    return res;
  },



  //搜索常见问题
  commonAdvisory_v1_search: async function (data) {
    const res = http.post(
      constant.BASE_URL + "/commonAdvisory/v1/search",
      data
    );
    return res;
  },

  //新增健康咨询
  medicalAdvisory_v1_create: async function (data) {
    const res = http.post(
      constant.BASE_URL + "/medicalAdvisory/v1/create",
      data
    );
    return res;
  },

  //药房展示
  pharmacy_v1_list: async function (data) {
    const res = http.post(constant.BASE_URL + "/pharmacy/v1/list", data);
    return res;
  },

  //健康档案展示前台
  medicalArchive_v1_list_frontEnd: async function (data) {
    const res = http.post(
      constant.BASE_URL + "/medicalArchive/v1/list/frontEnd",
      data
    );
    return res;
  },
  //健康档案就诊记录展示前台
  medicalArchive_v1_list_frontEnd_record: async function (data) {
    const res = http.post(
      constant.BASE_URL + "/medicalArchive/v1/list/record",
      data
    );
    return res;
  },
  //档案绑定
  medicalArchive_v1_bind: async function (data) {
    const res = http.post(constant.BASE_URL + "/medicalArchive/v1/bind", data);
    return res;
  },

  //添加简历
  training_resume: async function (data) {
    const res = http.post(constant.BASE_URL + "/training/resume/my", data);
    return res;
  },

  //更新简历
  training_resume_update: async function (data) {
    const res = http.put(constant.BASE_URL + "/training/resume/my", data);
    return res;
  },

  //根据用户获取简历
  training_resume_get: async function (data) {
    const res = http.get(constant.BASE_URL + "/training/resume/user/" + data);
    return res;
  },


  //添加简历投递表
  training_positionApply: async function (data) {
    const res = http.post(constant.BASE_URL + "/training/positionApply", data);
    return res;
  },

  //分页查询简历投递表
  training_positionApply_pageByCurrentUser: async function (data) {
    const res = http.post(constant.BASE_URL + "/training/positionApply/pageByCurrentUser", data);
    return res;
  },

  //查询省市区，三级的树形结构
  region_v1_findTree: async function () {
    const res = http.get(constant.BASE_URL + "/region/v1/findTree");
    return res;
  },
  //获取公司详情
  training_company: async function (data) {
    const res = http.get(constant.BASE_URL + "/training/company/" + data);
    return res;
  },
  //获取职位信息
  training_position: async function (data) {
    const res = http.get(constant.BASE_URL + "/training/position/" + data);
    return res;
  },
  //分页查询课程列表
  training_course_page: async function (data) {
    const res = http.post(constant.BASE_URL + "/training/course/page", data);
    return res;
  },



  //分页查询职位信息
  training_position_page: async function (data) {
    const res = http.post(constant.BASE_URL + "/training/position/page", data);
    return res;
  },




  //获取所有课程类型列表
  training_courseCategory_getAll: async function () {
    const res = http.get(constant.BASE_URL + "/training/courseCategory/neighborhood/getAll");
    return res;
  },



  //获取课程详情
  training_course: async function (data) {
    const res = http.get(constant.BASE_URL + "/training/course/" + data);
    return res;
  },



  //课程点赞
  training_courseFavorite_courseId: async function (data) {
    const res = http.get(constant.BASE_URL + "/training/courseFavorite/" + data);
    return res;
  },

  //课程取消点赞
  training_courseFavorite_delete: async function (data) {
    const res = http.delete(constant.BASE_URL + "/training/courseFavorite/" + data);
    return res;
  },



  //查询评论树
  training_courseComment_tree: async function (data) {
    const res = http.post(constant.BASE_URL + "/training/courseComment/page", data);
    return res;
  },


  //删除评论
  training_courseComment_id: async function (data) {
    const res = http.get(constant.BASE_URL + "/training/courseComment/" + data);
    return res;
  },

  //添加评论
  training_courseComment: async function (data) {
    const res = http.post(constant.BASE_URL + "/training/courseComment", data);
    return res;
  },



  //查询省列表
  region_v1_findProviceList: async function () {
    const res = http.get(constant.BASE_URL + "/region/v1/findProviceList");
    return res;
  },


  //条件查询子行政区划，省级的父编码为‘-1’
  region_v1_findList: async function (data) {
    const res = http.get(constant.BASE_URL + "/region/v1/findList?" + data);
    return res;
  },


  //获取职位信息
  training_position_getSelectList: async function () {
    const res = http.get(constant.BASE_URL + "/training/position/getSelectList");
    return res;
  },

  //添加职位信息
  training_position_add: async function (data) {
    const res = http.post(constant.BASE_URL + "/training/position", data);
    return res;
  },

  //科室名称列表
  doctor_v1_doctorDepts: async function () {
    const res = http.get(constant.BASE_URL + "/doctor/v1/doctorDepts");
    return res;
  },
};